package de.tudarmstadt.fgbs.cafe.login;

import java.io.IOException;

import javax.naming.CommunicationException;

/**
 * A class implementing the {@link LoginInterface} has to check the
 * authorization to use the system.
 * 
 */
public interface LoginInterface {

    /**
     * Checks the user's authentication via password.
     * 
     * @param username
     *            The name of the user.
     * @param password
     *            The password of the user.
     * @return <code>true</code> if the user is authorized to use the system,
     *         otherwise <code>false</code>
     * @throws CommunicationException
     *             If an remote service is used and an error occurred while
     *             communicate with this server.
     * @throws IOException
     *             If an required configuration can not be found.
     */
    public boolean login(String username, String password)
	    throws CommunicationException, IOException;
}